<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            display: none;
        }
    </style>
</head>
<body>
    <input type="checkbox">
    <span>两周内自动登录</span>
    <div>密码有风险</div>
</body>
<script>
    document.querySelector('span').addEventListener('mouseover',function(){
        document.querySelector("div").style.display="block"
    })
    document.querySelector('span').addEventListener('mouseout',function(e){
        document.querySelector("div").style.display="none"
    })
</script>
</html>